<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<meta name="author" content="Aurelio Jargas www.aurelio.net">
<META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<LINK REL="stylesheet" TYPE="text/css" HREF="../inc/site.css">
<TITLE>News on Txt2tags v2.0</TITLE>
<link rel="icon" type="image/png" href="/favicon.png">
</HEAD>
<BODY>

<DIV CLASS="header" ID="header">
<H1>News on Txt2tags v2.0</H1>
<H3>July, 2004</H3>
</DIV>

<DIV CLASS="body" ID="body">
<div id="sidebar">
Hot
  <ul>
  <li id="menuonline"><a href="../online.php">Txt2tags Online</a></li>
  <li id="menumarkup"><a href="../markup.html">Markup Demo</a></li>
  </ul>
About
  <ul>
  <!-- <li id="menuhome"><a href="/">Home</a></li> -->
  <li id="menufeatures"><a href="../features.html">Features</a></li>
  <li id="menusample"><a href="../sample.html">Example</a></li>
  <li id="menushots"><a href="../shots.html">Screenshots</a></li>
  <li id="menudocs"><a href="../docs.html">Documentation</a></li>
  <li id="menutips"><a href="../tips.html">Tips &amp; Tricks</a></li>
<!--
  <li id="menuoldnews"><a href="../misc/oldnews.html">Old News</a></li>
-->
  </ul>
Code
  <ul>
  <li id="menudownload"><a href="../download.html">Download</a></li>
  <li id="menuchangelog"><a href="../changelog.html">Changelog</a></li>
  <li id="menutools"><a href="../tools.html">Tools</a></li>
  <li><a href="http://bugs.txt2tags.org">Bug tracker</a></li>
  <li><a href="http://svn.txt2tags.org">SVN</a></li>
  </ul>
Community
  <ul>
  <li id="menuwiki"><a href="http://wiki.txt2tags.org">Wiki</a></li>
  <li id="menublog"><a href="http://txt2tags.wordpress.com">Blog</a></li>
  <li id="menuteam"><a href="../team/index.html">The Team</a></li>
  <li id="menuchildren"><a href="../children.html">The Children</a></li>
  <li id="menucomments"><a href="http://txt2tags.wordpress.com/user-comments/">User Comments</a></li>
  <li id="menuart"><a href="../art.html">Artwork</a></li>
  </ul>
Social
  <ul>
  <li id="menuml"><a href="../ml.html">Mailing List</a></li>
  <li><a href="http://www.facebook.com/pages/txt2tags/335201827209">Facebook</a></li>
  <li><a href="http://twitter.com/aureliojargas">twitter</a></li>
  <!-- <li><a href="http://www.orkut.com.br/Main#Community?cmm=87935">Orkut</a></li> -->
  <li><a href="http://identi.ca/group/txt2tags">identi.ca</a></li>
  </ul>

<P>
<A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=verde%40aurelio%2enet&amp;item_name=txt2tags%20donation&amp;no_shipping=1&amp;return=http%3a%2f%2faurelio%2enet%2fdonate%2dthanks%2ehtml&amp;cn=&amp;tax=0&amp;currency_code=USD&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8"><IMG ALIGN="middle" SRC="../img/donate.png" BORDER="0" alt="DONATE"></A>
</P>
</div>
<DIV CLASS="toc">

  <UL>
  <LI><A HREF="#toc1">About</A>
  <LI><A HREF="#bignews">Big News</A>
    <UL>
    <LI><A HREF="#xhtml">New supported target: XHTML</A>
    <LI><A HREF="#w3c">HTML and XHTML documents approved by W3C</A>
    <LI><A HREF="#rc">User configuration file (RC)</A>
    <LI><A HREF="#includeconf">New command %!includeconf</A>
    <LI><A HREF="#options">New command line options</A>
    <LI><A HREF="#anchor">Optional anchor for titles</A>
    <LI><A HREF="#i18n">The program was internationalized (i18n)</A>
    </UL>
  <LI><A HREF="#news">Other Great News</A>
    <UL>
    <LI><A HREF="#gui">Graphical Interface redesigned and customizable</A>
    <LI><A HREF="#web">Web Interface improved</A>
    <LI><A HREF="#button">New "txt2tags powered" button</A>
    <LI><A HREF="#verbose">Informative messages about the conversion</A>
    <LI><A HREF="#dumpconfig">New --dump-config option</A>
    <LI><A HREF="#rawarea">New mark for raw text area</A>
    <LI><A HREF="#includeraw">New %!include type for raw text</A>
    <LI><A HREF="#rewrite">Txt2tags source code rewritten</A>
    <LI><A HREF="#import">Txt2tags Python module</A>
    </UL>
  <LI><A HREF="#targets">Improvements on Targets</A>
    <UL>
    <LI><A HREF="#man">Man Page target (man)</A>
    <LI><A HREF="#moin">MoinMoin target (moin)</A>
    <LI><A HREF="#tex">LaTeX target (tex)</A>
    <LI><A HREF="#html">HTML target (html)</A>
    <LI><A HREF="#mgp">MagicPoint target (mgp)</A>
    </UL>
  <LI><A HREF="#extra">Extras</A>
  <LI><A HREF="#toc27">Okay</A>
  </UL>

</DIV>

<H1 ID="toc1">About</H1>

<P>
This document details all the new features introduced in txt2tags
version 2.0. There are lots os them, read it all!
</P>
<P>
If you already use some previous version of the program, please read
the <A HREF="upgrade.html">Upgrade Guide</A> first.
</P>

<H1 ID="bignews">Big News</H1>

<P>
There are the real hotspots of the 2.0 release.
</P>

<H2 ID="xhtml">New supported target: XHTML</H2>

<UL>
<LI>XHTML was the most user requested document target, and now it is
  available.
<P></P>
<LI>XHTML is the evolution of HTML, with more strict rules that forces
  the code to be more sane and readable.
<P></P>
<LI>Txt2tags generates W3C approved "<I>XHTML 1.0 Transitional</I>" code.
<P></P>
<LI>For easy identification, all XHTML tags are lowercased, and HTML are
  uppercased.
</UL>

<H2 ID="w3c">HTML and XHTML documents approved by W3C</H2>

<UL>
<LI>The HTML and XHTML code generated by txt2tags is approved by the
  <A HREF="http://validator.w3.org/">W3C validator</A>.
<P></P>
<LI>W3C is the consortium that creates the Internet standards as HTML,
  XHTML and CSS. Being W3C-compliant is cool.
<P></P>
<LI>Among other changes, now all the paragraphs are closed (&lt;/P&gt;) and
  all images have the (empty) ALT attribute.
<P></P>
<LI>Note that the encoding specification is mandatory to the validator
  (i.e. <CODE>--encoding iso-8859-1</CODE>).
<P></P>
<LI>The nice "W3C approved" images are included on the tarball.
<P></P>
<LI><A HREF="http://validator.w3.org/check?uri=referer">Check this page now!</A>
</UL>

<H2 ID="rc">User configuration file (RC)</H2>

<UL>
<LI>Now the user can store in one place the configuration to be used by
  ALL .t2t files.
<P></P>
<LI>It is called RC file, and is handy for user customization.
<P></P>
<LI>Its location is <CODE>$HOME/.txt2tagsrc</CODE> in Linux and <CODE>%HOME\_t2trc</CODE>
  in Windows.
<P></P>
<LI>There is a sample RC file on the tarball: <CODE>doc/txt2tagsrc</CODE>.
<P></P>
<LI>The format is exactly the same as the one used on the .t2t files
  CONF area:
<P></P>
<PRE>
% my configs

% always use CSS-friendly tags in HTML
%!options(html): --css-suggar

% change the default TOC depth for all targets
%!options: --toc-level 4

% set the default encoding for all documents
%!options: --encoding iso-8859-1
</PRE>

<P></P>
<LI>The RC file reading can be disabled by the <CODE>--no-rc</CODE> command line
  option
</UL>

<H2 ID="includeconf">New command %!includeconf</H2>

<UL>
<LI>The new <CODE>%!includeconf</CODE> command is used to include configurations
  from an external file into the current one.
<P></P>
<LI>Useful to share the same config for multiple files.
<P></P>
<LI>The format inside the included file is the same as in the
  <A HREF="#rc">RC file</A>.
<P></P>
<LI>This command is valid inside the .t2t file CONF area only.
<P></P>
<PRE>
My First Document
John Doe
July, 2004

%!includeconf: config.t2t

Hi, this is my first document.
</PRE>

</UL>

<H2 ID="options">New command line options</H2>

<TABLE ALIGN="center">
<TR>
<TD>--dump-config</TD>
<TD>Shows all the configuration that was found</TD>
</TR>
<TR>
<TD>--debug</TD>
<TD>Shows debug messages when converting a document</TD>
</TR>
<TR>
<TD>-v, --verbose</TD>
<TD>Shows informative messages when converting a document</TD>
</TR>
<TR>
<TD>-i, --infile</TD>
<TD>Specify the source file (.t2t)</TD>
</TR>
<TR>
<TD>--encoding</TD>
<TD>Specify the document encoding (same as %!encoding)</TD>
</TR>
<TR>
<TD>--rc</TD>
<TD>Reads the user config file (default ON)</TD>
</TR>
<TR>
<TD>--css-suggar</TD>
<TD>Makes the code CSS-friendly for HTML and XHTML</TD>
</TR>
<TR>
<TD>--no-style</TD>
<TD>Turns off --style</TD>
</TR>
<TR>
<TD>--no-toc</TD>
<TD>Turns off --toc</TD>
</TR>
<TR>
<TD>--no-toc-only</TD>
<TD>Turns off --toc-only</TD>
</TR>
<TR>
<TD>--no-enum-title</TD>
<TD>Turns off --enum-title</TD>
</TR>
<TR>
<TD>--no-mask-email</TD>
<TD>Turns off --mask-email</TD>
</TR>
<TR>
<TD>--no-encoding</TD>
<TD>Turns off --encoding</TD>
</TR>
<TR>
<TD>--no-rc</TD>
<TD>Turns off --rc</TD>
</TR>
<TR>
<TD>--no-infile</TD>
<TD>Turns off --infile</TD>
</TR>
<TR>
<TD>--no-outfile</TD>
<TD>Turns off --outfile</TD>
</TR>
<TR>
<TD>--no-css-suggar</TD>
<TD>Turns off --css-suggar</TD>
</TR>
</TABLE>

<H2 ID="anchor">Optional anchor for titles</H2>

<UL>
<LI>Now you can specify an anchor name for any title (numbered or not).
<P></P>
<LI>This anchor name can be used in local links, to jump to this title
  from any part of the document.
<P></P>
<LI>This page uses anchors for all titles, check the TOC!
<P></P>
<LI>The syntax to define an anchor is: <CODE>= title =[anchor]</CODE>.
<P></P>
<LI>To link to an anchor, use <CODE>#anchor</CODE>.
<P></P>
<PRE>
= Step Two: Install =[steptwo]

blablablablabla

Please, read the [Install Section #steptwo].
</PRE>

</UL>

<H2 ID="i18n">The program was internationalized (i18n)</H2>

<UL>
<LI>To internationalize a program is to prepare it to be translated to
  other languages.
<P></P>
<LI>"i18n" is the short for "internationalization".
<P></P>
<LI>All the relevant messages were i18n'ed, which include:
  <UL>
  <LI>Error messages
  <LI>Informative messages from <CODE>--verbose</CODE> option
  <LI>Output of <CODE>--dump-config</CODE> option
  <LI>Graphical Interface texts
  <P></P>
  </UL>
<LI>The first language it speaks besides english is Brazilian
  Portuguese:
<P></P>
<PRE>
$ txt2tags --help

Uso: txt2tags [OPÇÕES] [arquivo.t2t ...]

  -t, --target        define o formato do destino. tipos suportados:
                      html, xhtml, sgml, tex, man, mgp, moin, pm6, txt
  -i, --infile=ARQ    define ARQ como o arquivo fonte ('-' para STDIN)
  -o, --outfile=ARQ   define ARQ como o arquivo destino ('-' para STDOUT)
...
</PRE>

<P></P>
<LI>See the <CODE>po/README</CODE> tarball file for instructions on how to
  install the translations.
<P></P>
<LI>Package users (RPM, Debian, etc) don't need to install the
  translations by hand, it is already done.
<P></P>
<LI>See the <CODE>po/README</CODE> tarball file for instructions on how to
  translate the messages to your own language!
</UL>

<H1 ID="news">Other Great News</H1>

<P>
The heading says it all.
</P>

<H2 ID="gui">Graphical Interface redesigned and customizable</H2>

   <center><IMG ALIGN="middle" SRC="gui.png" BORDER="0" ALT=""></center>   

<UL>
<LI>New look (blue theme)
<P></P>
<LI>Shows more information as the output filename, encoding and style
<P></P>
<LI>Smart focus on the most used buttons
<P></P>
<LI>Interface colors configurable via <CODE>%!guicolors</CODE> setting on the
  <A HREF="#rc">RC file</A>:

<PRE>
%!guicolors: black white white black
</PRE>

</UL>

<H2 ID="web">Web Interface improved</H2>

   <center><IMG ALIGN="middle" SRC="web.png" BORDER="0" ALT=""></center>   

<UL>
<LI>Added the XHTML target
<P></P>
<LI>Added a checkbox for the <CODE>--enum-title</CODE> option
<P></P>
<LI>Richer default text to convert
<P></P>
<LI>Resulting code in blue
<P></P>
<LI>For HTML and XHTML targets, the parsed document is showed at the end
<P></P>
<LI>Code updated to work on newer versions of PHP
</UL>

<H2 ID="button">New "txt2tags powered" button</H2>

<UL>
<LI>The old <IMG ALIGN="middle" SRC="../img/t2tpowered-old-1.png" BORDER="0" ALT=""> now is <IMG ALIGN="middle" SRC="../img/t2tpowered.png" title="O>OOOO" BORDER="0" ALT="">.
<P></P>
<LI>Cute uh?
<P></P>
<LI>The idea is: The little white ball (<B>.t2t file</B>) can turn into
  nice happy colorful balls (<B>targets</B>) when passed thru the magic
  arrow (<B>txt2tags</B>).
<P></P>
<LI>There is also the ASCII version: <CODE>O&gt;OOOO</CODE>
<P></P>
<LI>Come on, free your mind! ;)
</UL>

<H2 ID="verbose">Informative messages about the conversion</H2>

<UL>
<LI>Using the new <CODE>-v</CODE> option, the program sends informative messages
  to the screen when converting a document.
<P></P>
<LI>The more 'v's you give, more messages appear.
<P></P>
<LI>The maximum level is three: <CODE>-vvv</CODE>.
<P></P>
<PRE>
$ txt2tags -v -t html sample.t2t 
----- Txt2tags 2.0 processing begins
----- Loading user configuration file
----- Loading source document
----- Scanning source document CONF area
----- Parsing and saving all config found (006 items)
----- We are on Command Line interface
----- Composing target Headers
----- Composing target Body
----- Composing target TOC
----- Composing target Footer
----- Saving results to the output file
txt2tags wrote sample.html
----- Txt2tags finished sucessfully
$
</PRE>

</UL>

<H2 ID="dumpconfig">New --dump-config option</H2>

<UL>
<LI>The new <CODE>--dump-config</CODE> command line option shows all the
  configurations found for a .t2t file.
<P></P>
<LI>It shows config of all possible sources:
  <UL>
  <LI>User config file (RC)
  <LI>Source document CONF area
  <LI>Command line options
  <P></P>
  </UL>
<LI>Very useful to detect configuration problems or conflicts.
<P></P>
<LI>Using this option, the file is NOT converted. The information
  is showed on the screen and that's all.
<P></P>
<PRE>
$ txt2tags --dump-config -t html sample.t2t
RAW config for RC file
  (all)    guicolors.....: ['blue', 'white', 'brown', 'yellow']

RAW config for source document
  (all)    encoding......: iso-8859-1

RAW config for command line
  (all)    infile........: sample.t2t
  (all)    dump-config...: ON
  (all)    target........: html
  (all)    realcmdline...: ['--dump-config', '-t', 'html', 'sample.t2t']

Full PARSED config
           dump-config...: ON
           encoding......: iso-8859-1
           guicolors.....: blue, white, brown, yellow
           infile........: sample.t2t
           realcmdline...: --dump-config, -t, html, sample.t2t
           sourcefile....: sample.t2t
           target........: html

Active filters
$
</PRE>

</UL>

<H2 ID="rawarea">New mark for raw text area</H2>

<UL>
<LI>The new mark <CODE>"""</CODE> can now be used to specify a raw line.
<P></P>
<PRE>
 """ These **asterisks** will not turn to bold.
</PRE>

<P></P>
<LI>It can be used also to delimit a raw area.
<P></P>
<PRE>
 """
 These **asterisks** will not turn to bold.
 Neither //this// or __this__ marks will be parsed.
 """
</PRE>

<P></P>
<LI>Raw is raw. No parsing is done inside it.
</UL>

<H2 ID="includeraw">New %!include type for raw text</H2>

<UL>
<LI>The <CODE>%!include</CODE> command has a new type of included file: raw text.
<P></P>
<LI>It is used to insert text that will not be scanned for txt2tags
  marks, just like raw line and raw area.
<P></P>
<LI>The syntax is to double quote the filename:
<P></P>
<PRE>
%!include: ""raw.txt""
</PRE>

</UL>

<H2 ID="rewrite">Txt2tags source code rewritten</H2>

<UL>
<LI>To support XHTML, all the tag generation schema needed to be
  redesigned, causing a code rewrite of the program core.
<P></P>
<LI>From past experience of limitations and exceptions, all the
  configuration handling code was rewritten also.
<P></P>
<LI>Then came the Graphical Interface, new marks, user config file, and
  after more than a year of spare-time-programming, the result is a
  cleaner, optimized and documented code.
<P></P>
<LI>The news include:
  <UL>
  <LI>Lines breaking at column 80, with TAB size of 8
  <LI>Added lots of useful comments
  <LI>pychecker friendly (from 123 warnings to 10)
  <LI>Now it is even readable! ;)
  <P></P>
  </UL>
<LI>Almost a rewrite from scratch.
</UL>

<H2 ID="import">Txt2tags Python module</H2>

<UL>
<LI>The program now is also an importable Python module.
<P></P>
<LI>Very handy to do customizations without changing the program source
  code.
<P></P>
<LI>Python programmers will know what to do with this:
<P></P>
<PRE>
&gt;&gt;&gt; import txt2tags
&gt;&gt;&gt; print txt2tags.my_version
2.0
&gt;&gt;&gt;
</PRE>

</UL>

<H1 ID="targets">Improvements on Targets</H1>

<H2 ID="man">Man Page target (man)</H2>

<UL>
<LI>Now your man pages can look just like all beautiful the Linux man
  pages, as <CODE>man cp</CODE> to take one.
<P></P>
<LI>The code generated was improved and now we've got full support for:
  <UL>
  <LI>Lists
  <LI>Numbered lists
  <LI>Definition lists
  <LI>Quoted text
  <LI>Tables!
  <P></P>
  </UL>
<LI>Check the txt2tags man page to see the results. It is on the <CODE>doc</CODE>
  directory of the tarball, or already installed in your system if
  you are a RPM or Debian user.
</UL>

<H2 ID="moin">MoinMoin target (moin)</H2>

<UL>
<LI>Now we've got full support for:
  <UL>
  <LI>Underlined text
  <LI>Quoted text
  <LI>Table cell align
  <LI>Comments
  <LI>TOC
  </UL>
</UL>

<H2 ID="tex">LaTeX target (tex)</H2>

<UL>
<LI>Headers diet: removed <CODE>amssymb</CODE> package.
<P></P>
<LI>Not breaking pages anymore before a heading.
<P></P>
<LI>The option <CODE>--style</CODE> now can be used to pass a package name to
  <CODE>\usepackage</CODE>.
<P></P>
<LI>Using <CODE>\clearpage</CODE> to separate TOC for first page and contents.
<P></P>
<LI>Image tag simplified, not using <CODE>\begin{figure}</CODE> anymore.
</UL>

<H2 ID="html">HTML target (html)</H2>

<UL>
<LI>All tags are uppercased (to be visually different from XHTML).
<P></P>
<LI>W3C validator approved code.
<P></P>
<LI>Closing all paragraphs, images with empty ALT attribute.
<P></P>
<LI>New option <CODE>--css-suggar</CODE>, to improve the CSS use with txt2tags
  (valid to XHTML also):
  <UL>
  <LI>&lt;DIV&gt; tags to mark document parts: header, toc, body
  <LI>&lt;BODY&gt; definition cleared, with no attributes
  <LI>Document leading headings defined as &lt;H1&gt;, &lt;H2&gt; and &lt;H3&gt;
  <LI>TOC contents with no &lt;HR&gt; around
  <LI>&lt;PRE&gt; blocks not indented with two spaces
  </UL>
</UL>

<H2 ID="mgp">MagicPoint target (mgp)</H2>

<UL>
<LI>Now images are alignable.
</UL>

<H1 ID="extra">Extras</H1>

<P>
New little things on the tarball that will make your life better.
</P>

<DL>
<DT>TEAM</DT><DD>
  Now you know who make what on the txt2tags development team.
<P></P>
<DT>doc/pt_BR/*</DT><DD>
  The Brazilian Portuguese documentation, including User Guide,
  samples, RULES and man page.
<P></P>
<DT>samples/css/*</DT><DD>
  Three sample CSS files already applied to the txt2tags sample file.
<P></P>
<DT>extras/css-reference.txt</DT><DD>
  A short and quick document showing the CSS attributes and its
  parameters. One per line, 'grep' friendly.
<P></P>
<DT>extras/html-update.sh</DT><DD>
  A simple Shell script to automatize the conversion of files in a
  directory. It scans and convert only the .t2t that has changed since
  the last conversion. There some options to use, as an interactive
  mode.
<P></P>
<DT>extras/t2tmake.rb</DT><DD>
  A powerful Ruby script that automatize the conversion of txt2tags
  files. It scans directories, convert needed files and generate logs.
  It also has a nice batch feature, to store different sets of
  configurations.
<P></P>
<DT>extras/nanorc</DT><DD>
  The nano editor syntax highlight rules for txt2tags marks.
<P></P>
<DT>extras/txt2tags-kate.xml</DT><DD>
  The Kate editor syntax highlight rules for txt2tags marks.
<P></P>
<DT>extras/txt2tags-compiler.vim</DT><DD>
  The Vim editor config file for using the single command ':make' to
  convert the opened document.
</DL>

<H1 ID="toc27">Okay</H1>

<P>
Now that you have read it all,
</P>

<OL>
<LI><A HREF="../download.html">Download the new version</A>
<P></P>
<LI>Enjoy!
</OL>

</div><div id="footer">
<P>
<IMG ALIGN="middle" SRC="../img/t2tpowered-white.png" BORDER="0" ALT="">
</P>
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png"></a>
<P>
Last modified on 11 January 2012 at 19:15
(<A HREF="news.t2t">See sources</A>,
<A HREF="http://validator.w3.org/check?uri=referer">Validate HTML</A>)
</P>
</div><div id="fake">
<!-- Google Analytics code -->
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-280222-14']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</DIV>

<!-- html code generated by txt2tags 2.6.641 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -t html ./v2/news.t2t -->
</BODY></HTML>
